Augmented reality is the process of mixing real input images (typically videos) and virtual 3D objects, in such a way that virtual 3D objects seem to belong to the real scene being shot. An important aspect of augmented reality is lighting of the virtual objects. In order for virtual 3D objects to appear seamlessly mixed in a real environment, they need to be positioned in accordance with the point of view of real camera, but they also need to be lit in a similar way to the real environment. This process is commonly referred to as relighting.
In order to address relighting of virtual 3D objects in accordance with a real environment, acquired in the form of images, one has to have some knowledge on the light sources positions in the real environment relatively to the virtual objects. It would be desirable to analyze an image, such as a photo or video stream, in real time to detect a main lighting direction from the input image, which corresponds to a key light in order to correctly light the virtual objects. As this process is performed in real time, it would be desirable to not rely on the assumption that a known object is viewed in the real scene and that it does not rely on the micro-surface properties of viewed real objects.